<?php
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magento.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magento.com for more information.
 *
 * @category    design
 * @package     default_iphone
 * @copyright   Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
 * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
?>
<?php
/**
 * Product list template
 *
 * @see Mage_Catalog_Block_Product_List
 */
?>
<?php
$_productCollection = $this->getLoadedProductCollection();
$catalogMod  = Mage::getModel('catalog/category');
$_helper = $this->helper('catalog/output');
$_catalogHp  = $this->helper('catalog/category');

$categoryModel=Mage::getModel("catalog/category");
$rootCategoryID=Mage::app()->getStore()->getRootCategoryId();
$childID=$categoryModel->load($rootCategoryID)->getChildren();
$categoryUrl=Mage::getModel("catalog/category")->load($childID)->getUrl();

?>
<?php if(!$_productCollection->count()): ?>
    <p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
<?php else: ?>
    <div class="category-products-main">
     <div class="category-products-top">
         <ul>
             <a href="#menu"><li><span><?php echo $this->__('全部分类') ?></span><i class="triangle-icon"></i></li></a>
             <li id="category-filter"><span><?php echo $this->__('品牌') ?></span><i class="triangle-icon"></i></li>
             <li id="category-sort"><span><?php echo $this->__('排序') ?></span><i class="triangle-icon"></i></li>
         </ul>
     </div>
     <div class="category-products-filtrate"></div>
     <div class="category-products-filtrate2"></div>
     <div class="category-products-content">
        
        <div class="Regional-filter">
            <?php echo $this->getChildHtml('catalog.filter')?>
        </div>
        <div class="Sorting-filter">
            <?php echo $this->getToolbarHtml() ?>
            <span><a title="<?php echo $this->__('Reset') ?>" href="<?php echo $categoryUrl ?>"><?php echo $this->__('Reset') ?></a></span>
        </div>
    </div>
<div class="category-products">
    <?php $_collectionSize = $_productCollection->count() ?>
    <?php $_columnCount = $this->getColumnCount(); ?>
    <ul class="c-list">
        <?php $i=0; foreach ($_productCollection as $_product): ?>
        <li>
            <div class="wrap">
                <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>">
                    <div class="product-image">
                        <img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image'); ?>" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
                    </div>
                </a>
                <div class="product-shop">
                    <div>
                        <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>">
                            <p><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></p>
                        </a>
                        <?php echo $this->getPriceHtml($_product, true) ?>
                            <div class="addToCart" data-action="<?php echo $this->getUrl('checkout/cart/addAjax',array('product'=>$_product->getId())); ?>">
                                <span class="fa fa-minus num-down" id="num-down"></span>
                                <span class="qty-span"><input type="text" name="qty" class="pnum" id="qty"/></span>
                                <span class="fa fa-plus num-up" id="num-up"></span>
                                <button class="add-to-cart-button"><i class="fa fa-cart-plus cart-icon"></i></button>
                            </div>
                    </div>
                </div>
            </div>
        </li>
    <?php endforeach ?>
</ul>
</div>
</div>
<?php endif; ?><!-- 
<div style="display:none;">
<?php echo $this->getToolBarHtml();?>
</div> -->
